<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<script src="./vue.js" type="text/javascript" charset="utf-8"></script>
	<body>
		<div id="app-5">
			<p>{{message}}</p>
			<button type="button" v-on:click="reverseMessage">点击反转消息</button>
		</div>
		<hr>
		<div id="app-6">
			<p>{{message}}</p>
			<input v-model="message"/>
		</div>
	</body>
	<script type="text/javascript">
		const app5 = new Vue({
			el: '#app-5',
			data: {
				message: 'hello vue js'
			},
			methods: {
				reverseMessage() {
					this.message = this.message.split('').reverse().join('')

				}
			}
		})
		const app6 = new Vue({
			el:'#app-6',
			data:{
				message: 'hello world'
			}
		})
	</script>
	
</html>
